package cn.dnui_wwt524.dnuifood_16110100524.model;

import java.util.List;

import cn.dnui_wwt524.dnuifood_16110100524.bean.FoodBean;
import cn.dnui_wwt524.dnuifood_16110100524.bean.ShopBean;
import cn.dnui_wwt524.dnuifood_16110100524.iface.ShopIface;
import cn.dnui_wwt524.dnuifood_16110100524.listener.OnRetrofitListener;
import cn.dnui_wwt524.dnuifood_16110100524.service.ShopService;
import retrofit2.Call;

public class ShopModel extends BaseModel implements ShopIface {
    private ShopService shopService;
    public ShopModel(){
        super();
        shopService = retrofit.create(ShopService.class);
    }

    @Override
    public void getAllShops(OnRetrofitListener listener) {
        Call call = shopService.getAllShops();
        bindCallBack(call,listener,1);
    }

    @Override
    public void getFoodByShop(String shop_id, OnRetrofitListener listener) {
        Call call = shopService.getFoodByShop(shop_id);
        bindCallBack(call,listener,2);
    }

    @Override
    public void getShopById(String shop_id, OnRetrofitListener listener) {
        Call call = shopService.getShopById(shop_id);
        bindCallBack(call,listener,3);
    }






}
